import request from '@/utils/request'

export default {

  // 01 获取所有分类
  getAll() {
    return request({
      url: `/eduService/subject/listSubject`,
      method: 'post'
    })
  },
  // 03 通过ID删除分类
  deleteSubject(id) {
    return request({
      url: `/eduService/subject/del/${id}`,
      method: 'post'
    })
  },
  // 04 删除全部数据
  deleteAll() {
    return request({
      url: `/eduService/subject/delAll`,
      method: 'post'
    })
  },
  // 05 添加子级
  saveChild(subject) {
    return request({
      url: `/eduService/subject/saveChild`,
      method: 'post',
      data: subject
    })
  },
  // 06 修改
  update(subject) {
    return request({
      url: `/eduService/subject/update`,
      method: 'post',
      data: subject
    })
  }

}



